package com.winit.service.controller;

import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.alibaba.dubbo.config.annotation.Reference;
import com.winit.core.service.ServiceB;
import com.winit.core.service.ServiceC;

@RestController
public class TestController {

    @Reference(check=true,version="${serviceB.service.version}")
    private ServiceB serviceB;
    
    @Reference(check=true,version="${serviceC.service.version}")
    private ServiceC serviceC;
    
    
    @RequestMapping("/{name}")
    public String test(@PathVariable("name") String name) {
        return serviceB.sayHallo(name) + serviceC.sayHello(name);
    }
}
